package com.cfy.mybatis.spring.service;

import com.cfy.mybatis.spring.mapper.UserMapper;
import com.dubbo.service.api.mainpk.User;
import com.dubbo.service.api.FooService;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class FooServiceImpl implements FooService{

    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    public User doSomeBusinessStuff(String id) {
        System.out.print('\n'+"I have provided an service for consumer!"+'\n'); //这里是否可以用AOP来实现
        return this.userMapper.getUser(id);
    }

    @Override
    public List<User> getAllUser() {
        return this.userMapper.getUsers();
    }

    @Override
    public void insert(User x) {
        this.userMapper.insertUserInfo(x);
    }
}
